﻿using System.Windows.Controls;

namespace ComicTool.Drawing
{
    public abstract class DrawingItem
    {
        private bool added;

        public void Draw(Canvas canvas, double width, double height)
        {
            if (!added)
            {
                Add(canvas);
                added = true;
            }
            Resize(width, height);
        }

        protected abstract void Add(Canvas canvas);

        protected abstract void Resize(double width, double height);
    }
}
